import inspect

def test__input_str():
    print()
    print(f'running [{inspect.currentframe().f_code.co_name}] ...')
    from kinyx.command_util import input_str
    
    print()
    name = input_str(
        required        = False,
        input_info      = 'name',
    )
    print('name<-', name)
    
    print()
    occupation = input_str(
        required        = False,
        input_info      = 'occupation',
        optionals       = ['worker', 'farmer', 'doctor'],
        help_message    = 'your occupation',
    )
    print('occupation<-', occupation)
    
    print()
    nationality = input_str(
        required        = False,
        input_info      = 'nationality',
        default_value   = 'China',
        help_message    = 'your nationality',
    )
    print('nationality<-', nationality)
    
    print()
    gender = input_str(
        required        = False,
        input_info      = 'gender',
        optionals       = ['male', 'female'],
        default_value   = 'female',
        help_message    = 'your gender',
    )
    print('gender<-', gender)

#test__input_str()

def test__input_bool():
    print()
    print(f'running [{inspect.currentframe().f_code.co_name}] ...')
    from kinyx.command_util import input_bool
    
    agree = input_bool(
        input_info      = 'agree',
    )
    print('agree<-', agree)

#test__input_bool()

def test__input_int():
    print()
    print(f'running [{inspect.currentframe().f_code.co_name}] ...')
    from kinyx.command_util import input_int
    
    age = input_int(
        input_info      = 'age',
        #range_min       = 18,
        #range_max       = 80,
        optionals       = [3, 5],
    )
    print('age<-', age)

#test__input_int()

def test__input_str__extend():
    print()
    print(f'running [{inspect.currentframe().f_code.co_name}] ...')
    from kinyx.command_util import input_str
    
    result = input_str(
        required        = False,
        input_info      = 'test',
        startswith      = '-',
        #startswith      = ['-', '+'],
        endswith        = '.mp4',
        #endswith        = ['.mp4', '.avi'],
    )
    print('result<-', result)

test__input_str__extend()